package main

import "fmt"

// defer 延迟从处理// 多个defer从小往上执行
// return
// 1. 赋值
// 2. 执行defer
// 3. ret

func deferDemo() {
	fmt.Println("start")
	defer fmt.Println("defer1")
	defer fmt.Println("defer2")
	defer fmt.Println("defer3")

	fmt.Println("end")

	//start
	//end
	//defer
}

func main() {

	deferDemo()
	//start
	//end
	//defer

}
